package com.coderknock.bbs.mybatis.dao

import com.coderknock.bbs.mybatis.domain.User
import org.apache.ibatis.session.SqlSession
import org.springframework.stereotype.Repository

/**
 * <p></p>
 * @author 三产
 * @version 1.0
 * @date 2017-11-17
 * @QQGroup 213732117
 * @website http://www.coderknock.com
 * @copyright Copyright 2017 拿客 coderknock.com  All rights reserved.
 * @since JDK 1.8
 */
@Repository
class UserDao {
    var sqlSession: SqlSession

    constructor(sqlSession: SqlSession) {
        this.sqlSession = sqlSession
    }

    fun findAll() = sqlSession.selectList<User>("selectAllUser")
}